package deepbitview

import grails.test.*

class TickerServiceTests extends GrailsUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    /**
     * test the result of the latest exchange rate
     */
    void testFetchLatestUSDExchangeRate() {

        TickerService service = new TickerService()

        double exchange = service.fetchLatestUSDExchangeRate()

        println "exchange rate: ${exchange}"
        assertTrue(exchange != null)

        assertTrue(exchange != 0)

        assertTrue(exchange != TickerService.ERROR_CODE)

    }
}
